package com.acsior.hibernate.vo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;
import com.acsior.dac.impl.hibernate.vo.HibernatePersistantIntegerIdVO;

/**
 * LetterOfAttorney entity. @author MyEclipse Persistence Tools <b><i>powered by
 * Belev</i></b>
 */
@Entity
@Table(name = "letter_of_attorneys")
@GeneratorKey(tableName = "letter_of_attorneys")
public class LetterOfAttorneyVO extends HibernatePersistantIntegerIdVO {

	private static final long serialVersionUID = -4047467199454492342L;

	@Column(name = "attorney_number", length = 50)
	private String attorneyNumber;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "customer_id", nullable = false)
	private CustomerVO customer;

	@Temporal(TemporalType.DATE)
	@Column(name = "expiration_date", length = 10)
	private Date expirationDate;

	@Temporal(TemporalType.DATE)
	@Column(name = "issue_date", length = 10)
	private Date issueDate;

	@Column(name = "issued_by", length = 100)
	private String issuedBy;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "nom_attorney_type_id", nullable = false)
	private NomAttorneyTypeVO nomAttorneyType;

	@Column(name = "notary_number", length = 50)
	private String notaryNumber;

	/** default constructor */
	public LetterOfAttorneyVO() {
		super();
	}

	/** @return the attorneyNumber */
	public String getAttorneyNumber() {
		return this.attorneyNumber;
	}

	/** @return the customer */
	public CustomerVO getCustomer() {
		return this.customer;
	}

	/** @return the expirationDate */
	public Date getExpirationDate() {
		return this.expirationDate;
	}

	/** @return the issueDate */
	public Date getIssueDate() {
		return this.issueDate;
	}

	/** @return the issuedBy */
	public String getIssuedBy() {
		return this.issuedBy;
	}

	/** @return the nomAttorneyType */
	public NomAttorneyTypeVO getNomAttorneyType() {
		return this.nomAttorneyType;
	}

	/** @return the notaryNumber */
	public String getNotaryNumber() {
		return this.notaryNumber;
	}

	/**
	 * @param attorneyNumber
	 *            the attorneyNumber to set
	 */
	public void setAttorneyNumber(String attorneyNumber) {
		this.attorneyNumber = attorneyNumber;
	}

	/**
	 * @param customer
	 *            the customer to set
	 */
	public void setCustomer(CustomerVO customer) {
		this.customer = customer;
	}

	/**
	 * @param expirationDate
	 *            the expirationDate to set
	 */
	public void setExpirationDate(Date expirationDate) {
		this.expirationDate = expirationDate;
	}

	/**
	 * @param issueDate
	 *            the issueDate to set
	 */
	public void setIssueDate(Date issueDate) {
		this.issueDate = issueDate;
	}

	/**
	 * @param issuedBy
	 *            the issuedBy to set
	 */
	public void setIssuedBy(String issuedBy) {
		this.issuedBy = issuedBy;
	}

	/**
	 * @param nomAttorneyType
	 *            the nomAttorneyType to set
	 */
	public void setNomAttorneyType(NomAttorneyTypeVO nomAttorneyType) {
		this.nomAttorneyType = nomAttorneyType;
	}

	/**
	 * @param notaryNumber
	 *            the notaryNumber to set
	 */
	public void setNotaryNumber(String notaryNumber) {
		this.notaryNumber = notaryNumber;
	}

}